home *** CD-ROM | disk | FTP | other *** search
- global gUserName, gFirstCharSprite, gNumberOfChars
-
- on startMovie
- go("Printing...")
- if the machineType = 256 then
- startTimer()
- repeat while the timer < 180
- nothing()
- end repeat
- end if
- set the text of cast "userName" to gUserName
- go("Printout")
- setProp(1, 48, "puppet", 1)
- nameToBitmap()
- printFrom(the frame, the frame)
- setProp(1, 48, "puppet", 0)
- go("Printout2")
- printFrom(the frame, the frame)
- set the text of cast "userName" to "?"
- play done
- end
-
- on resetStage
- set the rect of the stage to rect(64, 23, 576, 671)
- end
-
- on nameToBitmap
- if the controlDown then
- go(the frame + 1)
- go(the frame - 1)
- end if
- set gFirstCharSprite to 4
- set gNumberOfChars to 40
- if the number of chars in gUserName < gNumberOfChars then
- set gNumberOfChars to the number of chars in gUserName
- end if
- set whichSprite to gFirstCharSprite - 1
- set spaceCast to the number of cast " 32"
- repeat with x = 1 to gNumberOfChars
- set whichChar to char x of gUserName
- set whichCast to the number of cast (whichChar & charToNum(whichChar))
- if whichCast > 0 then
- set whichSprite to whichSprite + 1
- set the stretch of sprite whichSprite to 0
- set the castNum of sprite whichSprite to whichCast
- set the ink of sprite whichSprite to 36
- set the backColor of sprite whichSprite to 0
- if whichCast = spaceCast then
- set the foreColor of sprite whichSprite to 0
- else
- set the foreColor of sprite whichSprite to 255
- end if
- updateStage()
- set newWidth to 20.0 / gNumberOfChars
- if newWidth < 0.10000000000000001 then
- set newWidth to 0.10000000000000001
- else
- if newWidth > 2.0 then
- set newWidth to 2.0
- end if
- end if
- set newLeft to the left of sprite whichSprite
- set newRight to (the right of sprite whichSprite - newLeft) * newWidth
- if newRight < (newLeft + 2) then
- put whichChar
- set newRight to newRight + 2
- end if
- set newTop to the top of sprite whichSprite
- set newBottom to the bottom of sprite whichSprite
- spriteBox(whichSprite, newLeft, newTop, newRight, newBottom)
- updateStage()
- if whichSprite > gFirstCharSprite then
- set charOffset to the left of sprite whichSprite - the locH of sprite whichSprite
- set the locH of sprite whichSprite to the right of sprite (whichSprite - 1) + 1 - charOffset
- end if
- updateStage()
- end if
- end repeat
- updateStage()
- set nameLeft to the left of sprite gFirstCharSprite
- set nameRight to the right of sprite whichSprite
- set nameCenter to (nameRight - nameLeft) / 2
- set centerStage to (the stageRight - the stageLeft) / 2
- set offsetH to centerStage - nameCenter
- repeat with x = gFirstCharSprite to whichSprite
- set the locH of sprite x to the locH of sprite x + offsetH
- set the locV of sprite x to 550
- end repeat
- repeat with x = whichSprite + 1 to gFirstCharSprite + 40
- set the locV of sprite x to -500
- end repeat
- updateStage()
- end
-
- on setProp startSprite, endSprite, whichProperty, whichValue
- repeat with x = startSprite to endSprite
- do("set the " & whichProperty & " of sprite x=whichValue")
- end repeat
- end
-
- on showChars
- repeat with x = 30 to 255
- put "Char " & x & ": " & numToChar(x)
- end repeat
- end
-